<?php

namespace Home\Controller;
use Think\Controller;

//微信配置地址
class ServicesController extends Controller {
	 
	 //精品文章
   	 public function fineArticles(){
   	 	//$id=I("id");  //本地cat_id=17,正式环境cat_id=20
   	 	$url = C('WEBURL').U('/News/index',array("cat_id"=>20));
		header("Location:$url");
   	 	/*if (!isset($_SESSION['openid']) ) {
   	 		$urlU = urlencode($url);
   	 		$api = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".C("APPID")."&redirect_uri=".$urlU."&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
   	 	}
   	 	else
   	 	{
   	 		$api = $url;
   	 	}
   	 	header("Location:$api");
   	 	*/
   	 	
   	 }
   	 

   	 //新闻资讯
   	 public function newsinfo(){
   	 	$cat_id=I("cat_id");
   	 	$url = C('WEBURL').U('/News/info',array("cat_id"=>$cat_id));
   	 	header("Location:$url");
   	 	/*if (!isset($_SESSION['openid']) ) {
   	 	 $urlU = urlencode($url);
   	 	 $api = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".C("APPID")."&redirect_uri=".$urlU."&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
   	 	 }
   	 	 else
   	 	 {
   	 	 $api = $url;
   	 	 }
   	 	header("Location:$api");*/ 
   	 }
   	 
   	 
   	 
	 
	  //包邮价
   	 public function packagePrice(){
   	 	
   	 	$url = C('WEBURL').U('/Parcel/index');
		header("Location:$url");
   	 	/*if (!isset($_SESSION['openid']) ) {
   	 		$urlU = urlencode($url);
   	 		$api = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".C("APPID")."&redirect_uri=".$urlU."&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
   	 	}
   	 	else
   	 	{
   	 		$api = $url;
   	 	}
   	 	header("Location:$api");*/
   	 	
   	 	
   	 }
	 
	  //特价商品
   	 public function bargainGoods(){
   	 	
   	 	$url = C('WEBURL').U('/Specialoffer/index');
		header("Location:$url");
   	 	/*if (!isset($_SESSION['openid']) ) {
   	 		$urlU = urlencode($url);
   	 		$api = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".C("APPID")."&redirect_uri=".$urlU."&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
   	 	}
   	 	else
   	 	{
   	 		$api = $url;
   	 	}
   	 	header("Location:$api");*/
   	 	
   	 	
   	 }
    
   	 
   	 //用户登录
   	 public function loginuser(){
   	 
   	 	$url = C('WEBURL').U('/Login/login');
   	 	header("Location:$url");
   	 	/*if (!isset($_SESSION['openid']) ) {
   	 	 $urlU = urlencode($url);
   	 	 $api = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".C("APPID")."&redirect_uri=".$urlU."&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
   	 	 }
   	 	 else
   	 	 {
   	 	 $api = $url;
   	 	 }
   	 	header("Location:$api");*/
   	 
   	 
   	 }
   	 
   	 //用户注册
   	 public function reguser(){
   	 
   	 	$url = C('WEBURL').U('/Login/registeruser');
   	 	header("Location:$url");
   	 	/*if (!isset($_SESSION['openid']) ) {
   	 	 $urlU = urlencode($url);
   	 	 $api = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".C("APPID")."&redirect_uri=".$urlU."&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
   	 	 }
   	 	 else
   	 	 {
   	 	 $api = $url;
   	 	 }
   	 	header("Location:$api");*/
   	 
   	 
   	 }
   
}

?>